package net.pulseproject.commons.gui;

import com.google.inject.AbstractModule;
import com.google.inject.Scopes;
import com.google.inject.assistedinject.FactoryProvider;

public class CommonsGuiGuiceModule extends AbstractModule {

	@Override protected final void configure() {
		bind(IconsLoader.class).to(IconsLoaderImpl.class).in(Scopes.SINGLETON);
		bind(IconsCache.class).to(IconsCacheImpl.class).in(Scopes.SINGLETON);

		bind(SafeCatchingActionListenerFactory.class).toProvider(
				FactoryProvider.newFactory(SafeCatchingActionListenerFactory.class, SafeCatchingActionListenerImpl.class));
		
		bind(ExceptionDialogFactory.class).toProvider(
				FactoryProvider.newFactory(ExceptionDialogFactory.class, ExceptionDialog.class));
	}

}
